//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing.Diagram
{
    internal class SDCategory : IOfficeXmlSerializable
    {
        internal const string xmlName = "cat";
        private int pri;
        private string type;

        #region IOfficeXmlSerializable Members

        public void ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read(xmlName))
            {
                type = c.GetString("type");
                pri = c.GetUIntegerAsInteger("pri");
            }
        }

        public void WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write(xmlName))
            {
                c.SetString("type", type );
                c.SetUIntegerAsInteger("pri", pri );
            }
        }

        #endregion
    }
}